/*
 * Project : Linuxbox
 * File    : UserManEdit.java
 * Version : 1.0
 * Author  : Kevin Zhang
 *
 * Copyright (c) 2000-2001 by Linuxbox, Inc.
 * All rights reserved.
 */
package linuxbox.bbs.servlet;

import javax.servlet.http.*;

import linuxbox.common.*;
import linuxbox.bbs.logic.*;

public class BbsCatEditAction extends Action {
	protected static final String BBS_CAT_ID_PARAM = "CAT_ID";         
	protected static final String BBS_CAT_NAME_PARAM = "CAT_NAME";

	protected static String successJSP = null;
	
    public void doAction(HttpSession aSession, BoxSession aBoxSession, 
    HttpServletRequest req, HttpServletResponse res) throws Exception {
		int BbsCatID = Integer.parseInt(req.getParameter(BBS_CAT_ID_PARAM));
	
		BbsManager bm = BbsManager.getInstance();
		String BbsCatName = bm.getCatName(BbsCatID);

		req.setAttribute(BBS_CAT_ID_PARAM, Integer.toString(BbsCatID));
		req.setAttribute(BBS_CAT_NAME_PARAM, BbsCatName);

		sendFile(successJSP, req, res);
	}

	public void setSuccessJSP(String str) {
		successJSP = str;
	}
}
